package com.beikbank.cloud.controller;


import com.beikbank.cloud.bean.User;
import com.beikbank.cloud.feign.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangzhanjin on 2017/10/10.
 */
@RestController
public class MovieController {
     @Autowired
     private UserFeignClient userFeignClient;

     @GetMapping("/movie/{id}")
     public User findById(@PathVariable Long id){
          return userFeignClient.findById(id);
     }

     @GetMapping("/test")
     public User testPost(User user){
          return userFeignClient.postUser(user);
     }
}
